
<%@page import="java.util.Map"%>
<%@page import="cn.ylhx.venue.background.entity.Background"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c" %> 
<c:set var="basePath" value="${pageContext.request.contextPath}"></c:set>

<link rel="stylesheet" href="${basePath}/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="${basePath}/bootstrap/css/bootstrap-datepicker.min.css" />
<link rel="stylesheet" href="${basePath}/static/css/font-awesome.min.css">
<link rel="stylesheet" href="${basePath}/static/plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="${basePath}/bootstrap/css/bootstrap-table.min.css">
<link rel="stylesheet" href="${basePath}/static/css/main.css">
<link rel="stylesheet" href="${basePath}/static/plugins/treegrid/jquery.treegrid.css">

<script src="${basePath}/jquery/jquery-3.2.1.min.js"></script>
<script src="${basePath}/jquery/jquery.validate.min.js"></script>
<script src="${basePath}/jquery/jquery.form.js"></script>
<script src="${basePath}/bootstrap/js/bootstrap.min.js"></script>
<script src="${basePath}/bootstrap/js/bootstrap-datepicker.min.js"></script>
<script src="${basePath}/bootstrap/js/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="${basePath}/bootstrap/js/bootstrap-table.min.js"></script>
<script src="${basePath}/static/plugins/layer/layer.js"></script>
<script src="${basePath}/static/plugins/treegrid/jquery.treegrid.min.js"></script>
<script src="${basePath}/static/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
<script src="${basePath}/static/plugins/treegrid/jquery.treegrid.extension.js"></script>
<script src="${basePath}/static/plugins/treegrid/tree.table.js"></script>
<script src="${basePath}/static/plugins/ztree/jquery.ztree.all.min.js"></script>

<script src="${basePath}/js/common/page.js"></script>
<script type="text/javascript">
//初始化datepicker对象
$('.datepicker').datepicker({
	 todayHighlight: true,
	 language:"zh-CN", 
    format: 'yyyy-mm-dd',
    autoclose: true//选中自动关闭
})
</script>
<div class="container">
   <!-- 页面导航 -->
   <div class="page-header">
		<div class="page-title" style="padding-bottom: 5px">
		<%
		Map<String,Object> map =(Map)request.getAttribute("map");
		%>
			<h3>场次选择</h3>
		</div>
	</div>
	<!-- 日期操作 -->
	
	 <table id="monitor">
   		 <tr>
     	 	<td></td>
      		<td></td>
     		 <td></td>
     		 <td></td>
      		<td></td>
      		<td></td>
      		<td></td>
    	</tr>
 	 </table>
	
	
			<table class="table table-bordered">
					<thead>
						<tr>
						    <th></th>
							<c:forEach items="${map.list_session}" var="session" varStatus="vs">
							<th>${session.name}</th>
							</c:forEach> 
						</tr>
					</thead>
					<tbody id="tbodyId">
					<c:forEach items="${map.list_timeSlice}" var="timeSlice" varStatus="vs">
							<tr>
								<td>${timeSlice.time_slice}</td>
							</tr>
							</c:forEach> 
						
					
					</tbody>
				</table> 
	
</div>
<script type="text/javascript"> 
function Pro() 
 { 
    //var ProDate=$(this).parent().parent() td:first.html();
  // alert(ProDate)
 //alert( $(this).parent().parent().children('td').eq(0).html());
  
    window.location.href="${basePath}/mobile/proposeSiteDetail.do?ProDate="+"2017-11-01";
 }

window.onload = function(){     
    var cells = document.getElementById('monitor').getElementsByTagName('td');
    var clen = cells.length;
    var currentFirstDate;
    var formatDate = function(date){       
      var year = date.getFullYear()+'-';
      var month = (date.getMonth()+1)+'-';
      var day = date.getDate();
      var week = '('+['星期天','星期一','星期二','星期三','星期四','星期五','星期六'][date.getDay()]+')'; 

      return year+month+day+'</br>'+week;
    };
    var addDate= function(date,n){    
      date.setDate(date.getDate()+n);    
      return date;
    };
    var setDate = function(date){       
      var week = date.getDay()-1;
      date = addDate(date,week-1);
      currentFirstDate = new Date(date);

      for(var i = 0;i<clen;i++){         
        cells[i].innerHTML = formatDate(i==0 ? date : addDate(date,1));
      }        
    };         
    setDate(new Date());
  }
  //填充tbody的值
	var background=${map.list_background};
	alert(background)
	
  
 </script>
 <script type="text/javascript" src="${basePath}/js/proposeSite/proposeSite_list.js"></script>
